import json
import os


dir_list = os.listdir("./output")

merge_data = []

for i in dir_list:
    if "signal_seg" in i:
        with open(os.path.join("./output",i), "r") as f:
            data = json.load(f)
            merge_data.extend(data)


with open("./output/ioda_signal_data.json", "w") as f:
    json.dump(merge_data,f,ensure_ascii=False)